public class work226 {
    public static void main(String[] args) {
        int a=2,b=1,c;
        double s=0;
        for (int i=1;i<=20;i++){
            s=s+(double)a/b;
            c=b;
            b=a;
            a=b+c;
        }
        System.out.println("前二十项之和为："+s);
    }
}
